package temp.methodGeneric;

/**
 * Created by admin on 2016-11-7.
 */
public class GenMethodDemo {

    static <T extends Comparable<T>,V extends T> boolean isIn(T x,V[] y){

        for (int i=0;i<y.length;i++){
            if(x.equals(y[i])) return true;
        }
        return false;
    }

    public static void main(String[] args) {

        System.out.println(Integer.class.getSuperclass().getName());
        System.out.println(int.class.getName());

        if(int.class==Integer.class){
            System.out.println(".....");
        }
        Integer nums[]={1,2,3};

        if(isIn(2,nums)){
            System.out.println("ok");
        }
    }
}
